﻿import java.util.Scanner;

public class prac_09 {

	public static void main(String[] args) {
		// TODO 自动生成的方法存根

		String answer = "y";
		do{
			Scanner sc = new Scanner(System.in);
			System.out.println("请输入第一个数：");
			double num1 = sc.nextDouble();
			System.out.println("请输入第二个数：");
			double num2 = sc.nextDouble();
			System.out.println("1.+  2.-  3.*  4./  5.%");
			int choose = sc.nextInt();
			switch(choose){
			case 1:
				System.out.println(num1+num2);
				break;
			case 2:
				System.out.println(num1-num2);
				break;
			case 3:
				System.out.println(num1*num2);
				break;
			case 4:
				System.out.println(num1/num2);
				break;
			case 5:
				System.out.println(num1%num2);
				break;
			default:
				System.out.println("请输入正确的运算符：");
				break;

			}System.out.println("是否继续(y/n)：");
			answer =sc.next();
		}while(answer.equals("y"));
		System.out.println("程序结束！");
	}
}